
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jinjidan"></use>
                    </svg>
                    <div class="name">紧急单</div>
                    <div class="fontclass">#icon-jinjidan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fuwu"></use>
                    </svg>
                    <div class="name">服务</div>
                    <div class="fontclass">#icon-fuwu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yu"></use>
                    </svg>
                    <div class="name">雨</div>
                    <div class="fontclass">#icon-yu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhishiku"></use>
                    </svg>
                    <div class="name">知识库</div>
                    <div class="fontclass">#icon-zhishiku</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yingjihuiyi"></use>
                    </svg>
                    <div class="name">应急会议</div>
                    <div class="fontclass">#icon-yingjihuiyi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jiancezhan"></use>
                    </svg>
                    <div class="name">监测站</div>
                    <div class="fontclass">#icon-jiancezhan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon"></use>
                    </svg>
                    <div class="name">河道断面</div>
                    <div class="fontclass">#icon-icon</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-quyongshui"></use>
                    </svg>
                    <div class="name">日制水量</div>
                    <div class="fontclass">#icon-quyongshui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-tzdheliu"></use>
                    </svg>
                    <div class="name">TZD河流</div>
                    <div class="fontclass">#icon-tzdheliu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jinjishijian"></use>
                    </svg>
                    <div class="name">紧急事件</div>
                    <div class="fontclass">#icon-jinjishijian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yangliu"></use>
                    </svg>
                    <div class="name">洋流</div>
                    <div class="fontclass">#icon-yangliu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-quyu"></use>
                    </svg>
                    <div class="name">区控</div>
                    <div class="fontclass">#icon-quyu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhongguoshuili"></use>
                    </svg>
                    <div class="name">中国水利</div>
                    <div class="fontclass">#icon-zhongguoshuili</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-16-copy"></use>
                    </svg>
                    <div class="name">water</div>
                    <div class="fontclass">#icon-16-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xiashui"></use>
                    </svg>
                    <div class="name">下水</div>
                    <div class="fontclass">#icon-xiashui</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yingjiyuan"></use>
                    </svg>
                    <div class="name">应急预案</div>
                    <div class="fontclass">#icon-yingjiyuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shuizhi"></use>
                    </svg>
                    <div class="name">水质监测</div>
                    <div class="fontclass">#icon-shuizhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-neihehangdao"></use>
                    </svg>
                    <div class="name">内河航道</div>
                    <div class="fontclass">#icon-neihehangdao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-water"></use>
                    </svg>
                    <div class="name">广东水文展览馆</div>
                    <div class="fontclass">#icon-water</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-slyw"></use>
                    </svg>
                    <div class="name">水利要闻</div>
                    <div class="fontclass">#icon-slyw</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yujing"></use>
                    </svg>
                    <div class="name">预警模型</div>
                    <div class="fontclass">#icon-yujing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-paiwu"></use>
                    </svg>
                    <div class="name">排水</div>
                    <div class="fontclass">#icon-paiwu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shetangguanli"></use>
                    </svg>
                    <div class="name">水利管理</div>
                    <div class="fontclass">#icon-shetangguanli</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-icon58"></use>
                    </svg>
                    <div class="name">污染，核能</div>
                    <div class="fontclass">#icon-icon58</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-ganhan"></use>
                    </svg>
                    <div class="name">干旱</div>
                    <div class="fontclass">#icon-ganhan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-scheme"></use>
                    </svg>
                    <div class="name">方案</div>
                    <div class="fontclass">#icon-scheme</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youhua"></use>
                    </svg>
                    <div class="name">调度资源</div>
                    <div class="fontclass">#icon-youhua</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-information"></use>
                    </svg>
                    <div class="name">裕农通-服务点信息</div>
                    <div class="fontclass">#icon-information</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yingjichuzhi"></use>
                    </svg>
                    <div class="name">应急处置</div>
                    <div class="fontclass">#icon-yingjichuzhi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-moxing"></use>
                    </svg>
                    <div class="name">模型默认</div>
                    <div class="fontclass">#icon-moxing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wuranyuan"></use>
                    </svg>
                    <div class="name">污染源</div>
                    <div class="fontclass">#icon-wuranyuan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-meeting"></use>
                    </svg>
                    <div class="name">会议</div>
                    <div class="fontclass">#icon-meeting</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yinjijiance"></use>
                    </svg>
                    <div class="name">应急处理</div>
                    <div class="fontclass">#icon-yinjijiance</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-diaodu"></use>
                    </svg>
                    <div class="name">调度中心</div>
                    <div class="fontclass">#icon-diaodu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yuehai"></use>
                    </svg>
                    <div class="name">岳海</div>
                    <div class="fontclass">#icon-yuehai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gaojing"></use>
                    </svg>
                    <div class="name">告警</div>
                    <div class="fontclass">#icon-gaojing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhuanjia"></use>
                    </svg>
                    <div class="name">专家</div>
                    <div class="fontclass">#icon-zhuanjia</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-xun"></use>
                    </svg>
                    <div class="name">旬(1)</div>
                    <div class="fontclass">#icon-xun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-yue"></use>
                    </svg>
                    <div class="name">月(1)</div>
                    <div class="fontclass">#icon-yue</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-nian"></use>
                    </svg>
                    <div class="name">年(1)</div>
                    <div class="fontclass">#icon-nian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shuilisheshi"></use>
                    </svg>
                    <div class="name">水利设施</div>
                    <div class="fontclass">#icon-shuilisheshi</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
